package cn.mengxw.evcard.entity.cmd;

import org.meowy.cqp.jcq.entity.CoolQ;

public class CommandFacatory {
  public static BaseCommand createInstance(CoolQ CQ, Command command, Long fromQQ) {
    switch (command.getType()) {
      case "send_group_message":
        return new SendGroupMessage(CQ, command, fromQQ);
      case "add_auto_reply":
        return new AddAutoReply(CQ, command, fromQQ);
      case "add_auto_forbidden_words":
        return new AddAutoForbiddenWords(CQ, command, fromQQ);
    }

    return new DefaultCommand(CQ, command, fromQQ);
  }
}
